<style lang="less">
    @import "detail.less";
</style>
<template>

    <div>
        <Card style="width:100%" shadow>
            <Collapse v-model="showPanel">
                <Panel name="1">
                    日志
                    <div slot="content">
                        <approveHistory ref="approveHistory" :Obj="approveHistoryObj"/>
                    </div>
                </Panel>
                <Panel name="2">
                    基本信息
                    <div slot="content">
                        <Form ref="baseInfo" :model="caseInfo" class="detailForm"
                              :label-width="100"
                              inline>
                            <Row>
                                <Col span="8">
                                    <FormItem prop="startTime" label="申请时间">
                                        <DatePicker type="datetime" v-model="caseInfo.startTime" disabled placeholder="选择日期"></DatePicker>
                                    </FormItem>
                                </Col>
                                <Col span="8">
                                    <FormItem prop="endTime" label="结束时间" >
                                        <DatePicker type="datetime" v-model="caseInfo.endTime" disabled placeholder="选择日期"></DatePicker>
                                    </FormItem>
                                </Col>
                                <Col span="8">
                                    <FormItem prop="createBy" label="创建人">
                                        <Input type="text" v-model="caseInfo.createTagStr" disabled placeholder="请输入">
                                        </Input>
                                    </FormItem>
                                </Col>
                            </Row>
                            <Row>
                                <Col span="8">
                                    <FormItem prop="caseNo" label="案件编号" >
                                        <Input type="text" v-model="caseInfo.caseNo" disabled placeholder="请输入">
                                        </Input>
                                    </FormItem>
                                </Col>
                                <Col span="8">
                                    <FormItem prop="caseSource" label="来源">
                                        <Select v-model="caseInfo.caseSource" disabled placeholder="请选择">
                                            <Option v-for="item in dataDic.businessSource" :label="item.title" :value="item.value" :key="item.value">{{ item.title }}</Option>
                                        </Select>
                                    </FormItem>
                                </Col>
                            </Row>
                        </Form>
                    </div>
                </Panel>
                <Panel name="3">
                    合同信息
                    <div slot="content">
                        <Form ref="contractInfo" :model="contractInfo" class="detailForm"
                              :label-width="100"
                              inline>
                            <Row>
                                <Col span="8">
                                    <FormItem prop="applyNo" label="申请编号" >
                                        <Input type="text" v-model="contractInfo.applyNo" disabled placeholder="请输入">
                                        </Input>
                                    </FormItem>
                                </Col>
                                <Col span="8">
                                    <FormItem prop="custName" label="客户姓名" >
                                        <Input type="text" v-model="contractInfo.custName" disabled placeholder="请输入">
                                        </Input>
                                    </FormItem>
                                </Col>
                                <Col span="8">
                                    <FormItem prop="certNo" label="证件号码" >
                                        <Input type="text" v-model="contractInfo.certNo" disabled placeholder="请输入">
                                        </Input>
                                    </FormItem>
                                </Col>
                            </Row>
                            <Row>
                                <Col span="8">
                                    <FormItem prop="phone" label="联系方式" >
                                        <Input type="text" v-model="contractInfo.phone" disabled placeholder="请输入">
                                        </Input>
                                    </FormItem>
                                </Col>
                                <Col span="8">
                                    <FormItem prop="startDate" label="合同激活时间" >
                                        <DatePicker type="date" v-model="contractInfo.startDate" disabled placeholder="选择日期"></DatePicker>
                                    </FormItem>
                                </Col>
                                <Col span="8">
                                    <FormItem prop="endDate" label="合同终止时间" >
                                        <DatePicker type="date" v-model="contractInfo.endDate" disabled placeholder="选择日期"></DatePicker>
                                    </FormItem>
                                </Col>
                            </Row>
                            <Row>
                                <Col span="8">
                                    <FormItem prop="contractStatus" label="合同状态" >
                                        <Select v-model="contractInfo.contractStatus" disabled placeholder="请选择">
                                            <Option v-for="item in dataDic.contractStatus" :label="item.title" :value="item.value" :key="item.value">{{ item.title }}</Option>
                                        </Select>
                                    </FormItem>
                                </Col>
                                <Col span="8">
                                    <FormItem prop="channelType" label="渠道归属" >
                                        <Select v-model="contractInfo.channelType" disabled placeholder="请选择">
                                            <Option v-for="item in dataDic.channelType" :label="item.title" :value="item.value" :key="item.value">{{ item.title }}</Option>
                                        </Select>
                                    </FormItem>
                                </Col>
                                <Col span="8">
                                    <FormItem prop="overdueDaysHis" label="当前逾期天数" >
                                        <Input type="text" v-model="caseInfo.overdueDays" disabled placeholder="请输入">
                                        </Input>
                                    </FormItem>
                                </Col>
                            </Row>
                            <Row>
                                <Col span="8">
                                    <FormItem prop="paidTerms" label="已还期数" >
                                        <Input type="text" v-model="contractInfo.paidTerms" disabled placeholder="请输入">
                                        </Input>
                                    </FormItem>
                                </Col>
                                <Col span="8">
                                    <FormItem prop="unpaidTerms" label="未还期数" >
                                        <Input type="text" v-model="contractInfo.unpaidTerms" disabled placeholder="请输入">
                                        </Input>
                                    </FormItem>
                                </Col>
                                <Col span="8">
                                    <FormItem prop="channelName" label="合作商" >
                                        <Input type="text" v-model="contractInfo.channelName" disabled placeholder="请输入">
                                        </Input>
                                    </FormItem>
                                </Col>
                            </Row>
                            <Row>
                                <Col span="8">
                                    <FormItem prop="paidTerms" label="月供金额" >
                                        <Input type="text" v-model="contractInfo.monthPayAmt" disabled placeholder="请输入">
                                        </Input>
                                    </FormItem>
                                </Col>
                                <Col span="8">
                                    <FormItem prop="unpaidTerms" label="当期总应收" >
                                        <Input type="text" v-model="contractInfo.currentReceivable" disabled placeholder="请输入">
                                        </Input>
                                    </FormItem>
                                </Col>
                                <Col span="8">
                                    <FormItem prop="channelName" label="上次付款时间" >
                                        <DatePicker type="date" v-model="contractInfo.lastPayTime" disabled placeholder="选择日期"></DatePicker>
                                    </FormItem>
                                </Col>
                            </Row>
                            <Row>
                                <Col span="8">
                                    <FormItem prop="channelName" label="利率类型" >
                                        <Select v-model="contractInfo.rateType" disabled placeholder="请选择">
                                            <Option v-for="item in dataDic.rateType" :label="item.title" :value="item.value" :key="item.value">{{ item.title }}</Option>
                                        </Select>
                                    </FormItem>
                                </Col>
                            </Row>
                        </Form>
                    </div>
                </Panel>
                <Panel name="4" v-show="this.obj.caseType == 'BEFORE_CHARGE'">
                    提前还款信息
                    <div slot="content">
                        <Form ref="prepaymentInfo" :model="prepaymentInfo" class="detailForm"
                              :label-width="100"
                              inline>
                            <Row>
                                <Col span="8">
                                    <FormItem prop="caseNo" label="案件编号" >
                                        <Input type="text" v-model="prepaymentInfo.caseNo" disabled placeholder="请输入">
                                        </Input>
                                    </FormItem>
                                </Col>
                                <Col span="8">
                                    <FormItem prop="receivableAmount" label="应收净额" >
                                        <Input type="text" v-model="prepaymentInfo.receivableAmount" disabled placeholder="请输入">
                                        </Input>
                                    </FormItem>
                                </Col>
                                <Col span="8">
                                    <FormItem prop="repayDate" label="结算日期" >
                                        <DatePicker type="date" v-model="prepaymentInfo.repayDate" disabled placeholder="选择日期"></DatePicker>
                                    </FormItem>
                                </Col>
                            </Row>
                            <Row>
                                <Col span="8" >
                                    <FormItem prop="debitOrderStatus" label="扣款指令" >
                                        <Select v-model="prepaymentInfo.debitOrderStatus" disabled placeholder="请选择">
                                            <Option v-for="item in dataDic.validOrInvalid" :label="item.title" :value="item.value" :key="item.value">{{ item.title }}</Option>
                                        </Select>
                                    </FormItem>
                                </Col>
                            </Row>
                        </Form>
                    </div>
                </Panel>
                <Panel name="5">
                    业务办理：{{setDictTitleByType("caseType",this.caseInfo.caseType)}}
                    <div slot="content">
                        <Form ref="caseInfo" :model="caseInfo" :rules="caseInfoFormValidate" class="detailForm"
                              :label-width="100"
                              inline>
                            <Row>
                                <Col span="8">
                                    <FormItem prop="receivingBank" label="收款银行">
                                        <Select v-model="caseInfo.receivingBank" disabled placeholder="请选择">
                                            <Option v-for="item in dataDic.bankCode" :label="item.title" :value="item.value" :key="item.value">{{ item.title }}</Option>
                                        </Select>
                                    </FormItem>
                                </Col>
                                <Col span="8">
                                    <FormItem prop="payAmt" label="打款金额" >
                                        <Input type="text" v-model="caseInfo.payAmt" disabled placeholder="请输入">
                                        </Input>
                                    </FormItem>
                                </Col>
                                <Col span="8">
                                    <FormItem prop="payTime" label="打款时间">
                                        <DatePicker type="date" v-model="caseInfo.payTime" disabled placeholder="选择日期"></DatePicker>
                                    </FormItem>
                                </Col>
                            </Row>
                            <Row>
                                <Col span="8">
                                    <FormItem prop="payer" label="打款人" >
                                        <Input type="text" v-model="caseInfo.payer" disabled placeholder="请输入">
                                        </Input>
                                    </FormItem>
                                </Col>
                            </Row>
                            <Row>
                                <Col span="8">
                                    <FormItem prop="remarks" label="备注">
                                        <Input type="text" class="holeLine" disabled v-model="caseInfo.remarks" placeholder="请输入">
                                        </Input>
                                    </FormItem>
                                </Col>
                            </Row>
                            <Row>
                                <Col span="24">
                                    <FormItem prop="images" label="打款凭证">
                                        <Button @click="openUploadModal" type="primary" icon="ios-cloud-upload" >凭证查看</Button>
                                    </FormItem>
                                </Col>
                            </Row>
                        </Form>
                    </div>
                </Panel>
                <Panel name="6">
                    网银到账查询（到账勾稽）
                    <div slot="content">
                        <Row>
                            <Form  ref="searchForm" :model="searchForm" inline :label-width="100" class="detailForm">
                                <Row>
                                    <Col span="8">
                                        <Form-item label="收款账户" prop="arriveBank">
                                            <Select v-model="searchForm.arriveBank"  clearable placeholder="请选择到账银行">
                                                <Option v-for="item in backAccount" :value="item.account"
                                                        :label="setDictTitleByType('bankCode',item.bankCode)+':'+item.account"
                                                        :key="item.account">
                                                    {{ setDictTitleByType('bankCode',item.bankCode)+':'+item.account }}
                                                </Option>
                                            </Select>
                                        </Form-item>
                                    </Col>
                                    <Col span="8">
                                        <Form-item label="打款金额" prop="amt">
                                            <Input type="text" class="halfCell" v-model="searchForm.amtBottom" clearable/>
                                            -
                                            <Input type="text" class="halfCell" v-model="searchForm.amtTop" clearable/>
                                        </Form-item>
                                    </Col>
                                    <Col span="8">
                                        <Form-item label="进账时间" prop="time">
                                            <DatePicker v-model="selectDate" type="daterange" format="yyyy-MM-dd" clearable
                                                        @on-change="selectDateRange" placeholder="选择到账时间">
                                            </DatePicker>
                                        </Form-item>
                                    </Col>
                                </Row>
                                <Row>
                                    <Col span="8">
                                        <Form-item label="打款账户" prop="custName">
                                            <Input type="text" v-model="searchForm.custName" clearable placeholder="请输入付款客户"/>
                                        </Form-item>
                                    </Col>
                                    <Col span="8">
                                        <Form-item label="打款账号" prop="custAccount">
                                            <Input type="text" v-model="searchForm.custAccount" clearable placeholder="请输入打款账户"/>
                                        </Form-item>
                                    </Col>
                                </Row>
                                <Row>
                                    <Col align="middle">
                                        <Form-item>
                                            <Button @click="handleSearch" type="primary" icon="ios-search">搜索</Button>
                                            <Button @click="handleReset" type="primary" icon="ios-trash">重置</Button>
                                        </Form-item>
                                    </Col>
                                </Row>
                            </Form>
                        </Row>
                        <Row>
                            <Table max-height="500" ref="table" :loading="loading" :autoBackTop="false" :columns="bankArriveColums"
                                   @on-selection-change="showSelect" :data="bankArriveList">
                                <template slot-scope="{ row, index }" slot="receivingBank">
                                    <span>{{setDictTitleByType("bankCode",row.receivingBank)}}</span>
                                </template>
                                <template slot-scope="{ row, index }" slot="receivedAmt">
                                    <span>{{row.receivedAmt==""?"":row.receivedAmt.toFixed(2)}}</span>
                                </template>
                            </Table>
                        </Row>
                    </div>
                </Panel>
                <Panel name="7">
                    当前用户: {{userInfo ? userInfo.userRealName :''}}
                    <div slot="content">
                        <div class="content" style="width: 100%" >
                            <contractCurrentUser ref="contractCurrentUser" :needReasonType="false" :needFile="false" :Obj="{type:'corporateSettlementRent'}" @childUserForm="childUserForm" @closeSpin="closeSpin" />
                        </div>
                    </div>
                </Panel>
            </Collapse>
            <Affix :offset-bottom="38">
                <div style="text-align: center;">
                    <Button @click="agreeHandle" type="primary" icon="md-checkmark">审核通过</Button>
                    <Button @click="refuseHandle" type="primary" icon="md-close">拒绝</Button>
                </div>
            </Affix>
            <UploadFileModal
                ref="uploadFileModal"
                :modal="isUploadFileModalOpen"
                @closeModal="closeModal"
                :param="fileParams"
                @asyncSaveFileFn="asyncSaveFileFn"
                :isPreview="true"
            />
        </Card>
    </div>

</template>

<script>
    import {
        queryBankList
    } from "@/projects/basic/api/contract/bank-arrive/bankManagement";
    import {
        getByTypes
    } from "_p/basic/api/admin/datadic";
    import {
        queryCorporateByCaseNo,
        machBankArriveList,
        agreeSubmit,
        refuseSubmit,
        agreeCorporateValid
    } from "@/projects/basic/api/contract/corporate/corporateTransferManagement";

    import {
        contractInfoForCorporate,
    } from "@/projects/basic/api/contract/common/contract-info/contract-info";

    import {
        queryBankArriveListByCaseNo,
    } from "@/projects/basic/api/contract/bank-arrive/bankArriveManagement";
    import {getApplyInfoById} from "@/projects/basic/api/contract/clearance/stay-settle";

    import approveHistory from "../common/approve-history/approve-history";
    // 金融产品
    import contractCurrentUser from "_p/basic/pages/contract/common/current-user/contractCurrentUser";

    import LeaseFileUpload from '_c/file-upload/index'
    import UploadFileModal from "_p/basic/pages/contract/common/uploadFileModal/uploadFileModal";

    import {mapGetters} from "vuex";
    export default {
        name: "detailForDeal",
        components: {
            approveHistory,
            contractCurrentUser,
            LeaseFileUpload,
            UploadFileModal
        },
        props: {
            obj: {
                caseNo: "",
                contractNo: "",
                id:"",
                caseType:"",
                prepaymentApplyId:"",
                type:Object
            }
        },
        computed: {
            ...mapGetters({userInfo: "userInfo", roleType: "roles"})
        },
        data: function () {
            return {
                contractForm: {},
                contractFormValidate: {},
                isUploadFileModalOpen:false,
                fileParams:{},
                searchForm:{arriveBank:"",amtBottom:"",amtTop:"",custName:"",custAccount:"",startDate:"",endDate:""},
                backAccount:[],
                selectDate:null,
                loading:false,
                approveHistoryObj:{
                    caseNo:"",
                    contractNo:""
                },
                dicKeys: [
                    "bankCode","businessSource","contractStatus","channelType","caseType","rateType","validOrInvalid"
                ],
                showPanel:[],
                dataDic:{},
                caseInfo:{},
                prepaymentInfo:{},
                caseInfoFormValidate:{},
                contractInfo:{},
                contractInfoFormValidate:{},
                productInfo:{},
                bankArriveColums:[
                    {type: "selection",minWidth: 60,maxWidth:60,align: "center"},
                    {title: "网银编号",key: "ebankNo",minWidth: 160,align: "center"},
                    {title: "到账时间",key: "arrivalTime",minWidth: 100,align: "center"},
                    {title: "业务时间", key: "businessTime", minWidth: 100, align: "center"},
                    {title: "到账银行",key: "receivingBank",minWidth: 150,align: "center",slot: "receivingBank"},
                    {title: "到账银行账户",key: "bankAccount",minWidth: 150,align: "center"},
                    {title: "付款客户",key: "paymentCust",minWidth: 100,align: "center"},
                    {title: "客户账号",key: "custAccount",minWidth: 150,align: "center"},
                    {title: "到账金额",key: "receivedAmt",slot: "receivedAmt",minWidth: 100,align: "center"},
                    {title: "摘要",key: "summary",minWidth: 150,align: "center"},
                ],
                bankArriveList:[],
                selectCount:0,
                approve:{}
            }
        },
        mounted() {
            this.init();
        },
        methods: {
            showSelect(e) {
                this.selectList = e;
                this.selectCount = e.length;
            },
            messageUpload(uploadInfo){
                console.log(uploadInfo);
                this.$Message.info("上传文件"+JSON.stringify(uploadInfo));
            },
            deleteFile(fileInfo){
                console.log(fileInfo);
                this.$Message.info("删除文件"+JSON.stringify(fileInfo));
            },
            handleSearch() {
                this.selectBankArriveList();
            },
            handleReset() {
                this.$refs.searchForm.resetFields();
                this.selectDate = null;
                this.searchForm.startDate = "";
                this.searchForm.endDate = "";
                this.searchForm.bankCode = "";
                this.searchForm.amtBottom = "";
                this.searchForm.amtTop = "";
                // 重新加载数据
                this.selectBankArriveList();
            },
            selectBankArriveList(){
                this.loading = true;
                machBankArriveList(this.searchForm).then(res => {
                    this.loading = false;
                    if (res.code === "0000") {
                        this.bankArriveList = res.data;
                    }
                });
                this.selectCount=0;
            },
            selectDateRange(v) {
                if (v) {
                    this.searchForm.startDate = v[0];
                    this.searchForm.endDate = v[1];
                }
            },
            initDataDic(){
                let self = this;
                getByTypes(this.dicKeys).then(res => {
                    if (res.code === "0000" && res.data) {
                        self.dataDic = res.data;
                    }
                });
            },
            getDic(v){
                let dic = []
                switch(v) {
                    case "bankCode":
                        dic = this.dataDic.bankCode;
                        break;
                    case "businessSource":
                        dic = this.dataDic.businessSource;
                        break;
                    case "contractStatus":
                        dic = this.dataDic.contractStatus;
                        break;
                    case "channelType":
                        dic = this.dataDic.channelType;
                        break;
                    case "caseType":
                        dic = this.dataDic.caseType;
                        break;
                    case "validOrInvalid":
                        dic = this.dataDic.validOrInvalid;
                        break;
                    default:
                }
                return dic;
            },
            setDictTitleByType(v1,v2){
                let dic = {}
                if(!this.getDic(v1)) return '';
                this.getDic(v1).forEach(column => {
                    if(column.value === v2){
                        dic = column;
                    }
                });
                return dic.title;
            },
            queryPrepaymentInfo(){
                getApplyInfoById({id:this.obj.prepaymentApplyId}).then(res => {
                    if (res.code === "0000") {
                        this.prepaymentInfo = res.data;
                    }
                });
            },
            queryCaseInfo(){

                queryCorporateByCaseNo(this.obj.caseNo).then(res => {
                    if (res.code === "0000") {
                        this.caseInfo = res.data;
                        //网银到到账记录初始化匹配
                        this.searchForm.bankCode = this.caseInfo.receivingBank;
                        this.searchForm.amtBottom = this.caseInfo.payAmt;
                        this.searchForm.amtTop = this.caseInfo.payAmt;
                        this.searchForm.custName = this.caseInfo.payer;
                        this.searchForm.startDate = this.caseInfo.payTime;
                        this.searchForm.endDate = this.caseInfo.payTime;
                        //为对公勾稽案件匹配银行到账记录
                        this.loading = true;
                        machBankArriveList(this.searchForm).then(res => {
                            this.loading = false;
                            if (res.code === "0000") {
                                this.bankArriveList = res.data;
                                this.searchForm.bankCode = "";
                                this.searchForm.startDate = "";
                                this.searchForm.endDate = "";
                            }
                        });
                        this.selectCount=0;
                    }
                });
            },
            queryContractInfo(){
                contractInfoForCorporate({contractNo:this.obj.contractNo}).then(res => {
                    if (res.code === "0000") {
                        this.contractInfo = res.data;
                    }
                });
            },
            queryBankArriveList(){
                let params = {
                    caseId:this.obj.id
                };
                queryBankArriveListByCaseNo(params).then(res => {
                    if (res.code === "0000") {
                        this.bankArriveList = res.data;
                    }
                });
            },
            initBankAccount() {
                let params = {
                    //确认是否需要限定为有效状态的对公账号
                    status:"valid",
                    pageNumber:1,
                    pageSize:1000
                };
                queryBankList(params).then(res => {
                    if (res.code === "0000") {
                        this.backAccount = res.data.records;
                    }
                });
            },
            childUserForm(params){
                if (!params) return;
                this.$Spin.show();
                refuseSubmit(params).then(res => {
                    if (res.code === "0000") {
                        this.$Spin.hide();
                        this.$Message.success(res.data);
                        //回调
                        setTimeout(() => {
                            this.$emit('afterHandle');
                        }, 2000);
                    }else {
                        this.$Spin.hide();
                        this.$Message.error(res.data);
                        //回调
                        setTimeout(() => {
                            this.$emit('afterHandle');
                        }, 2000);
                    }
                }).catch(()=>{
                    this.$Spin.hide();
                });
            },
            agreeHandle(){
                //勾选数据校验
                if (this.selectCount <= 0 || this.selectCount == undefined) {
                    this.$Message.warning("请勾选数据");
                    return;
                }
                this.$Spin.show();
                //勾选数据组装
                let ldStr = "";
                this.selectList.forEach(function (e) {
                    ldStr += e.id + ",";
                });

                //请求数据组装
                let params = {
                    ids :ldStr,
                    caseId:this.caseInfo.id,
                    approvalOpinion:this.$refs.contractCurrentUser.formData.approvalOpinion
                }
                //提前还款相关信息
                if(this.obj.caseType == 'BEFORE_CHARGE'){
                    params.debitOrderStatus = this.prepaymentInfo.debitOrderStatus;
                }
                agreeCorporateValid(params).then(res => {
                    if (res.code === "0000") {
                        if ("1" == res.data.result){
                            this.agreeOperate(params);
                        }else {
                            this.$Spin.hide();
                            this.$Modal.confirm({
                                title: "谨慎操作",
                                content: res.data.msg,
                                onOk: () => {
                                    this.$Spin.show();
                                    this.agreeOperate(params);
                                }
                            });
                        }
                    }else {
                        this.$Spin.hide();
                        this.$Modal.confirm({
                            title: "谨慎操作",
                            content: res.data.msg,
                            onOk: () => {
                                this.$Spin.show();
                                this.agreeOperate(params);
                            }
                        });
                    }
                }).catch(e => {
                    this.$Spin.hide();
                    return false;
                });
            },
            agreeOperate(params){
                agreeSubmit(params).then(res => {
                    if (res.code === "0000") {
                        this.$Spin.hide();
                        this.$Message.success(res.data);
                        //回调
                        setTimeout(() => {
                            this.$emit('afterHandle');
                        }, 2000);
                    }else {
                        this.$Spin.hide();
                        this.$Message.error(res.data);
                        //回调
                        setTimeout(() => {
                            this.$emit('afterHandle');
                        }, 2000);
                    }
                }).catch(()=>{
                    this.$Spin.hide();
                });
            },
            refuseHandle(){
                //请求数据组装
                let params = {
                    caseId:this.caseInfo.id,
                    approvalOpinion:this.$refs.contractCurrentUser.formData.approvalOpinion
                }
                //提前还款相关信息
                if(this.obj.caseType == 'BEFORE_CHARGE'){
                    params.debitOrderStatus = this.prepaymentInfo.debitOrderStatus;
                }
                this.$refs.contractCurrentUser.formValidate("childUserForm",params)
            },
            openUploadModal() {
                this.fileParams = {
                    belongNo: this.caseInfo.contractNo,
                    busiNo:this.caseInfo.caseNo,
                    busiType: 'corporateTransfer',
                    busiData: {},
                    busiNodes:'corporateTransfer' //业务节点
                }
                this.isUploadFileModalOpen = true;
            },
            closeModal() {
                // 获取文件长度
                let l = this.$refs.uploadFileModal.getFileList()
                console.log(' 文件长度为：', l);

                this.isUploadFileModalOpen = false;
            },
            asyncSaveFileFn(data) {
                console.log('上传成功',data);
                this.$refs.formData.validate(valid => {
                    if (valid) {
                        let d = Object.assign({}, data, this.formData, this.oldData, this.Obj);

                        this.$emit(this.parentFuncName, d)
                        // this.$emit(funcName, d);
                    } else {
                        this.$Message.error("验证不通过!");
                        // this.$emit("closeSpin");
                        ths.closeSpin()
                        verifyErrorToView(this.$refs.formData.fields);
                    }
                })
            },
            init(){
                //加载提前还款信息
                if("BEFORE_CHARGE" == this.obj.caseType){
                    this.showPanel = [2,3,4,5,6,7];
                    this.queryPrepaymentInfo();
                }else{
                    this.showPanel = [2,3,5,6,7]
                }
                this.approve = {};
                //银行账户初始化
                this.initBankAccount();
                //加载数字字典
                this.initDataDic();
                //加载合同信息
                this.queryContractInfo();
                //操作历史记录数据加载
                this.approveHistoryObj.caseNo = this.obj.caseNo;
                this.approveHistoryObj.contractNo = this.obj.contractNo;
                //加载对公结算案件详情
                this.queryCaseInfo();
            },
            closeSpin(){
                this.$Spin.hide();
            }
        }
    }
</script>

